<div class="row">
    <div class="col-12">
        <div class="card m-b-30 m-t-30">
            <div class="card-body">
                <h4 class="mt-0 header-title">Add Role</h4>
                <p class="text-muted m-b-30 font-14">
                    Add a custom role.
                </p>
                <form class="needs-validation"
                      [ngClass]="{ 'was-validated': form.submitted }"
                      (ngSubmit)="form.form.valid && save()"
                      novalidate
                      #form="ngForm">
                    <app-validation-summary [problemDetails]="problemDetails"
                                            #validationSummary>
                    </app-validation-summary>
                    <div class="form-group row">
                        <label for="role-name"
                               class="col-sm-2 col-form-label">
                            Name (*)
                        </label>
                        <div class="col-sm-10">
                            <input id="role-name"
                                   name="role-name"
                                   type="text"
                                   class="form-control"
                                   [ngClass]="{ 'invalid': form.submitted && name.invalid }"
                                   [(ngModel)]="role.name"
                                   required
                                   maxlength="64"
                                   #name="ngModel" />
                            <div *ngIf="form.submitted && name.invalid"
                                 class="form-control-feedback text-danger">
                                Field 'Name' is required.
                            </div>
                        </div>
                    </div>
                    <div class="form-group row">
                        <label for="role-description"
                               class="col-sm-2 col-form-label">
                            Description
                        </label>
                        <div class="col-sm-10">
                            <textarea id="role-description"
                                      name="role-description"
                                      class="form-control"
                                      rows="3"
                                      maxlength="512"
                                      [(ngModel)]="role.description"
                                      #description="ngModel">
                            </textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div>
                            <button type="submit"
                                    class="btn btn-primary waves-effect waves-light m-r-5">
                                Save
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>